import plugin from '@/plugins'
import '@/assets/global.scss'
import { createApp } from 'vue'
import App from './App.vue'

function bootstrap() {
  const app = createApp(App)
  plugin(app)
  app.mount('#app')
}
function isMobileDevice() {
  const userAgent = navigator.userAgent || navigator.vendor || window.opera;

  // 检查是否为移动设备
  const mobileKeywords = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone'];

  // 如果 `User-Agent` 包含上述关键词之一，则认为是移动设备
  for (let keyword of mobileKeywords) {
    if (userAgent.indexOf(keyword) >= 0) {
      return true;
    }
  }

  // 否则，认为是桌面浏览器
  return false;
}

// 使用示例
if (isMobileDevice()) {
  console.log('This is a mobile device.');
} else {
  console.log('This is a desktop browser.');
}
bootstrap()
isMobileDevice()
